package com.qf.controller;

import org.springframework.security.access.prepost.PreAuthorize;
import org.springframework.web.bind.annotation.RequestMapping;
import org.springframework.web.bind.annotation.RestController;

/*
 *  @author Administrator
 *  @version V1.0
 *  @Project security
 *  @Package com.qf.controller
 *  @Description
 *  @Date2022/3/28 0028 21:43
 */
@RestController
@RequestMapping("/users")
public class UserController {
    @PreAuthorize("hasAuthority('users:add')")
    @RequestMapping("/add")
    public String add() {
        return "add";
    }

    @PreAuthorize("hasAuthority('users:info')")
    @RequestMapping("/info")
    public String info(){
        return "info";
    }

    @PreAuthorize("hasAuthority('users:edit')")
    @RequestMapping("/edit")
    public String edit() {
        return "edit";
    }
}
